package cn.zhangxh.org.domain;

import cn.zhangxh.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @param :
 * @Author zxh
 * @Date: 2022/1/22$ 14:49$
 * @Version 1.0
 * @return :
 * @Description: 员工字段表
 */
@Data
public class Product extends BaseDomain {

    private String name;
    private String resources;
    private BigDecimal saleprice;
    private Date offsaletime = new Date();
    private Date onsaletime = new Date();
    private Long state;
    private String costprice;
    private Date createtime = new Date();
    private Long salecount;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public void setOffsaletime(Date offsaletime) {
        this.offsaletime = offsaletime;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public void setOnsaletime(Date onsaletime) {
        this.onsaletime = onsaletime;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getOffsaletime() {
        return offsaletime;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getOnsaletime() {
        return onsaletime;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreatetime() {
        return createtime;
    }
}
